/*
 * ListViewEx
 * Copyright (C) 2008, Philip Pronin (philip.pronin@gmail.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "listViewEx.h"
#include "listViewExPlugin.h"

#include <QtPlugin>

ListViewExPlugin::ListViewExPlugin(QObject* parent) : QObject(parent) {
	initialized = false;
}

void ListViewExPlugin::initialize(QDesignerFormEditorInterface*) {
	if (initialized) return;
	initialized = true;
}

bool ListViewExPlugin::isInitialized() const {
	return initialized;
}

QWidget* ListViewExPlugin::createWidget(QWidget* parent) {
	return new ListViewEx(parent);
}

QString ListViewExPlugin::name() const {
	return "ListViewEx";
}

QString ListViewExPlugin::group() const {
	return "QTeXPreview";
}

QIcon ListViewExPlugin::icon() const {
	return QIcon();
}

QString ListViewExPlugin::toolTip() const {
	return "";
}

QString ListViewExPlugin::whatsThis() const {
	return "";
}

bool ListViewExPlugin::isContainer() const {
	return false;
}

QString ListViewExPlugin::domXml() const {
	return "<widget class=\"ListViewEx\" name=\"listViewEx\">\n"
		" <property name=\"geometry\">\n"
		"  <rect>\n"
		"   <x>0</x>\n"
		"   <y>0</y>\n"
		"   <width>200</width>\n"
		"   <height>100</height>\n"
		"  </rect>\n"
		" </property>\n"
		"</widget>\n";
}

QString ListViewExPlugin::includeFile() const {
	return "../../ui/listViewEx.h";
}

Q_EXPORT_PLUGIN2(customwidgetplugin, ListViewExPlugin)
